package com.zhaojk.audio.domain;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

/**
 * T2A请求的响应对象
 *
 * @author zhaojk
 */
@Data
public class T2AResponse {
    private ResponseData data;
    @JsonProperty("extra_info")
    private ExtraInfo extraInfo;
    private String traceId;
    @JsonProperty("base_resp")
    private BaseResp baseResp;

    @Data
    public static class ResponseData {
        private String audio;
        private int status;
    }

    @Data
    public static class ExtraInfo {
        @JsonProperty("audio_length")
        private int audioLength;
        @JsonProperty("audio_sample_rate")
        private int audioSampleRate;
        @JsonProperty("audio_size")
        private int audioSize;
        @JsonProperty("audio_bitrate")
        private int audioBitrate;
        @JsonProperty("word_count")
        private int wordCount;
        @JsonProperty("invisible_character_ratio")
        private int invisibleCharacterRatio;
        @JsonProperty("audio_format")
        private String audioFormat;
        @JsonProperty("usage_characters")
        private int usageCharacters;
    }

    @Data
    public static class BaseResp {
        @JsonProperty("status_code")
        private int statusCode;
        @JsonProperty("status_msg")
        private String statusMsg;
    }
}
